package com.shiikong_memory.yez.MySQLAPI.DaoImpl;

import com.shiikong_memory.yez.MySQLAPI.Dao.NoticeMapper;
import com.shiikong_memory.yez.MySQLAPI.JavaBean.NoticeBean;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServer{

    @Resource
    private NoticeMapper noticeMapper;

    public List<NoticeBean> getAll() {
        return noticeMapper.getAll();
    }


    public NoticeBean getByChatChannelId(String chatChannelId) {
        return noticeMapper.getByChatChannelId(chatChannelId);
    }


    public boolean addNotice(String ChatChannelId, String ChatChannelName, String GuildId, String BotId) {
        return noticeMapper.addNotice(ChatChannelId, ChatChannelName, GuildId, BotId);
    }


    public boolean updateByChatChannelId(String chatChannelId, String ChatChannelName) {
        return noticeMapper.updateByChatChannelId(chatChannelId, ChatChannelName);
    }


    public boolean deleteByChatChannelId(String chatChannelId) {
        return noticeMapper.deleteByChatChannelId(chatChannelId);
    }
}
